/*
 * OurPkrApp.java
 */

package ourpkr;

import ourpkr.view.OurPkrView;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
import ourpkr.controler.PartieComplete;

/**
 * The main class of the application.
 */
public class OurPkrApp extends SingleFrameApplication {

    private PartieComplete pc;
    private OurPkrView pview;

    public PartieComplete getPc() {
        return pc;
    }
    /**
     * At startup create and show the main frame of the application.
     */
    @Override protected void startup() {
        pc = new PartieComplete();
        pview = new OurPkrView(this) ;
        show(pview);
        pc.start();
        
    }

    public OurPkrView getPview() {
        return pview;
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of OurPkrApp
     */
    public static OurPkrApp getApplication() {
        return Application.getInstance(OurPkrApp.class);
    }

    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        try{
        launch(OurPkrApp.class, args);
        }
        catch(Exception e){
            System.out.println("Une erreur est survenue, l'application a du s'arreter ("+e.getMessage()+")");
            e.printStackTrace();
        }
    }
}
